const mysql = require('mysql2');

const connection = mysql.createPool({
    host: '114.132.210.22',
    port: 3306,
    user: 'todo',
    password: 'zEyjs3G5RyeebSx3',
    database: 'tododb'
});

connection.getConnection(err => {
    if (err) console.log(err);
    else console.log('数据库连接成功！！！');
})


module.exports = connection.promise();